package action;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

import dataType.AgencyData;
import dataType.ErrorData;
import exception.MyException;


public class ActionModificarAgencia2 extends Action {

	private static final long serialVersionUID = 1L;

	@Override
	public ActionForward execute(ActionMapping mapping, ActionForm form,
			HttpServletRequest req, HttpServletResponse resp) {
		
			String id = (String)req.getParameter("id");
			String name = (String)req.getParameter("name");
			String password = (String)req.getParameter("pass");
			String user = (String)req.getParameter("user");
			AgencyData ad = new AgencyData(new Integer(id), user, name, password);
			req.setAttribute("AgencyData", ad);
			return mapping.findForward("ok");							
	}
}
